<?php
class Opp{
    public $name ="";
    public function go()
    {
        echo "gogogoo...";
    }

}
//改变量必须是类A的对象
function test(A $a)
{
    $a->go();
}
test(new A());